import Vue from 'vue'
import App from './App.vue'
import router from './router/index'


import '@/styles/index.less'
import '@/styles/reset.less'
// 全局注册 Vant 组件 或者 函数

import { Col, Row } from 'vant';
import { Grid, GridItem } from 'vant';
import { Swipe, SwipeItem } from 'vant';
import { Lazyload } from 'vant';
import { Tabbar, TabbarItem } from 'vant';
import { List } from 'vant';
import { NavBar } from 'vant';
import { Button } from 'vant';
import { Icon } from 'vant';
import { Form } from 'vant';
import { Field } from 'vant';
import { Stepper } from 'vant';
import { Cell, CellGroup } from 'vant';
import { Switch } from 'vant';
import { Tab, Tabs } from 'vant';

Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Switch);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Stepper);
Vue.use(Form);
Vue.use(Field);
Vue.use(Icon);
Vue.use(Button);
Vue.use(NavBar);
Vue.use(List);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Lazyload);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Col);
Vue.use(Row);


// 通过过滤器实现时间的格式化处理
Vue.filter("formatDate", (val) => {
  // console.log(val)
  if (val) {
    return val.replace("T", " ").replace(".000Z", "");
  }
});

Vue.config.productionTip = false

new Vue({
  router:router,
  render: h => h(App),
}).$mount('#app')
